package cn.virens.server.netty_tcp.packet;

import cn.virens.server.netty_tcp.TCPServerChannel;

public abstract class Packet {
	private static final byte[] EMPTY_BYTES = new byte[0];
	private static final int EMPTY_VALUE = 0;

	private final TCPServerChannel channel;

	protected int seq = EMPTY_VALUE;
	protected int length = EMPTY_VALUE;
	protected int command = EMPTY_VALUE;
	protected byte[] data = EMPTY_BYTES;

	public Packet(TCPServerChannel channel) {
		this.channel = channel;
	}

	public TCPServerChannel channel() {
		return channel;
	}
}
